package 迭代器模式与组合模式;

import java.util.List;

/**
 * @author zzs
 * @ClassName Orange.java
 * @Description
 * @createTime 2022年05月18日 19:04:00
 */
public class Orange extends MenuItem {

    private final Integer[] count;

    public Orange(Integer[] count) {
        this.count = count;
    }

    @Override
    public Iterator createdItem() {
        return new ApplesIterator(this.count);
    }

    @Override
    public void setSonMenuItem(MenuItem menuItem) {
        this.menuItem = menuItem;
    }
}
